package com.jishuo.nontax.view.controller;

import com.jishuo.base.bean.BaseResult;
import com.jishuo.base.bean.vo.UserVO;
import com.jishuo.base.util.GTimeUtil;
import com.jishuo.nontax.bfc.service.SpecialService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

/**
 * @auther dinggaofei
 * @Date 2023/3/29 10:59
 */
@Slf4j
@Controller
@RequestMapping(value = "/view/payspecial", name = "划解专户柜面")
public class SpecialViewController {

    private String prefix = "view/";
    @Resource
    private SpecialService specialService;

    @RequestMapping(value = {"payspecialview"}, name = "化解专户柜面")
    public String index() {
        return prefix + "payspecialview";
    }
    @ResponseBody
    @RequestMapping(value = "queryPaySpecialData",name = "化解专户柜面")
    public BaseResult queryPaySpecialData(String billnum) {

        return specialService.getPaySpecial(billnum);
    }
    @ResponseBody
    @RequestMapping(value = "payspecialpayview",name="化解专户收款")
    public BaseResult payspecialpayview(String  billnum, String bankaffirm, HttpSession session){
        UserVO user = (UserVO)session.getAttribute("login_user");
        String paybankdt = GTimeUtil.getDateTimeMark();
        return  specialService.setSpecialPayInfo(billnum, bankaffirm, paybankdt, user.getBankStationName(), "");
    }

}
